<template>
  <div>
    <BarScan ref="qrcode" @ok="getResult" @err="geterror" />
    <div>{{result}}</div>
  </div>
</template>

<script>
import BarScan from '@/components/qrcode.vue'

var _self
export default {
  components: {
    BarScan
  },
  data() {
    return {
        result:''
    }
  },
  methods: {
    getResult(result) {
      this.result = result
    },
    geterror(e) {
        alert(e)
    //   this.$toast(e)
    }
  }
}
</script>
